<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span class="hs-cpp">
#ifdef __GLASGOW_HASKELL__
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Andy Gill and Colin Runciman, June 2006</span><span>
</span><span id="line-7"></span><span class="hs-comment">------------------------------------------</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-comment">-- | Minor utilities for the HPC tools.</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Trace.Hpc.Util</span><span>
</span><span id="line-12"></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier">HpcPos</span></a></span><span>
</span><span id="line-13"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#fromHpcPos"><span class="hs-identifier">fromHpcPos</span></a></span><span>
</span><span id="line-14"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#toHpcPos"><span class="hs-identifier">toHpcPos</span></a></span><span>
</span><span id="line-15"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#insideHpcPos"><span class="hs-identifier">insideHpcPos</span></a></span><span>
</span><span id="line-16"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier">HpcHash</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-17"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier">Hash</span></a></span><span>
</span><span id="line-18"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#catchIO"><span class="hs-identifier">catchIO</span></a></span><span>
</span><span id="line-19"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#readFileUtf8"><span class="hs-identifier">readFileUtf8</span></a></span><span>
</span><span id="line-20"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#writeFileUtf8"><span class="hs-identifier">writeFileUtf8</span></a></span><span>
</span><span id="line-21"></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#"><span class="hs-identifier">Control.DeepSeq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#deepseq"><span class="hs-identifier">deepseq</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Exception</span></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier">foldl'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier">ord</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Bits.html#xor"><span class="hs-identifier">xor</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier">createDirectoryIfMissing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier">takeDirectory</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-comment">-- | 'HpcPos' is an Hpc local rendition of a Span.</span><span>
</span><span id="line-34"></span><span class="hs-keyword">data</span><span> </span><span id="HpcPos"><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-var">HpcPos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="P"><span class="annot"><a href="Trace.Hpc.Util.html#P"><span class="hs-identifier hs-var">P</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042253"><span id="local-6989586621679042259"><span class="annot"><span class="annottext">HpcPos -&gt; HpcPos -&gt; Bool
(HpcPos -&gt; HpcPos -&gt; Bool)
-&gt; (HpcPos -&gt; HpcPos -&gt; Bool) -&gt; Eq HpcPos
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: HpcPos -&gt; HpcPos -&gt; Bool
$c/= :: HpcPos -&gt; HpcPos -&gt; Bool
== :: HpcPos -&gt; HpcPos -&gt; Bool
$c== :: HpcPos -&gt; HpcPos -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679042225"><span id="local-6989586621679042227"><span id="local-6989586621679042230"><span id="local-6989586621679042233"><span id="local-6989586621679042236"><span id="local-6989586621679042242"><span id="local-6989586621679042248"><span class="annot"><span class="annottext">Eq HpcPos
Eq HpcPos
-&gt; (HpcPos -&gt; HpcPos -&gt; Ordering)
-&gt; (HpcPos -&gt; HpcPos -&gt; Bool)
-&gt; (HpcPos -&gt; HpcPos -&gt; Bool)
-&gt; (HpcPos -&gt; HpcPos -&gt; Bool)
-&gt; (HpcPos -&gt; HpcPos -&gt; Bool)
-&gt; (HpcPos -&gt; HpcPos -&gt; HpcPos)
-&gt; (HpcPos -&gt; HpcPos -&gt; HpcPos)
-&gt; Ord HpcPos
HpcPos -&gt; HpcPos -&gt; Bool
HpcPos -&gt; HpcPos -&gt; Ordering
HpcPos -&gt; HpcPos -&gt; HpcPos
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: HpcPos -&gt; HpcPos -&gt; HpcPos
$cmin :: HpcPos -&gt; HpcPos -&gt; HpcPos
max :: HpcPos -&gt; HpcPos -&gt; HpcPos
$cmax :: HpcPos -&gt; HpcPos -&gt; HpcPos
&gt;= :: HpcPos -&gt; HpcPos -&gt; Bool
$c&gt;= :: HpcPos -&gt; HpcPos -&gt; Bool
&gt; :: HpcPos -&gt; HpcPos -&gt; Bool
$c&gt; :: HpcPos -&gt; HpcPos -&gt; Bool
&lt;= :: HpcPos -&gt; HpcPos -&gt; Bool
$c&lt;= :: HpcPos -&gt; HpcPos -&gt; Bool
&lt; :: HpcPos -&gt; HpcPos -&gt; Bool
$c&lt; :: HpcPos -&gt; HpcPos -&gt; Bool
compare :: HpcPos -&gt; HpcPos -&gt; Ordering
$ccompare :: HpcPos -&gt; HpcPos -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span class="hs-comment">-- | 'fromHpcPos' explodes the HpcPos into /line:column/-/line:column/</span><span>
</span><span id="line-37"></span><span class="annot"><a href="Trace.Hpc.Util.html#fromHpcPos"><span class="hs-identifier hs-type">fromHpcPos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span id="fromHpcPos"><span class="annot"><span class="annottext">fromHpcPos :: HpcPos -&gt; (Int, Int, Int, Int)
</span><a href="Trace.Hpc.Util.html#fromHpcPos"><span class="hs-identifier hs-var hs-var">fromHpcPos</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#P"><span class="hs-identifier hs-type">P</span></a></span><span> </span><span id="local-6989586621679042223"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042223"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span id="local-6989586621679042222"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042222"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621679042221"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042221"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span id="local-6989586621679042220"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042220"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042223"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042222"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042221"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042220"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-comment">-- | 'toHpcPos' implodes to HpcPos, from /line:column/-/line:column/</span><span>
</span><span id="line-41"></span><span class="annot"><a href="Trace.Hpc.Util.html#toHpcPos"><span class="hs-identifier hs-type">toHpcPos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span><span>
</span><span id="line-42"></span><span id="toHpcPos"><span class="annot"><span class="annottext">toHpcPos :: (Int, Int, Int, Int) -&gt; HpcPos
</span><a href="Trace.Hpc.Util.html#toHpcPos"><span class="hs-identifier hs-var hs-var">toHpcPos</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042219"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042219"><span class="hs-identifier hs-var">l1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042218"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042218"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042217"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042217"><span class="hs-identifier hs-var">l2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042216"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042216"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int -&gt; Int -&gt; HpcPos
</span><a href="Trace.Hpc.Util.html#P"><span class="hs-identifier hs-var">P</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042219"><span class="hs-identifier hs-var">l1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042218"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042217"><span class="hs-identifier hs-var">l2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042216"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- | Predicate determining whether the first argument is inside the second argument.</span><span>
</span><span id="line-45"></span><span class="annot"><a href="Trace.Hpc.Util.html#insideHpcPos"><span class="hs-identifier hs-type">insideHpcPos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-46"></span><span id="insideHpcPos"><span class="annot"><span class="annottext">insideHpcPos :: HpcPos -&gt; HpcPos -&gt; Bool
</span><a href="Trace.Hpc.Util.html#insideHpcPos"><span class="hs-identifier hs-var hs-var">insideHpcPos</span></a></span></span><span> </span><span id="local-6989586621679042215"><span class="annot"><span class="annottext">HpcPos
</span><a href="#local-6989586621679042215"><span class="hs-identifier hs-var">small</span></a></span></span><span> </span><span id="local-6989586621679042214"><span class="annot"><span class="annottext">HpcPos
</span><a href="#local-6989586621679042214"><span class="hs-identifier hs-var">big</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-47"></span><span>             </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042213"><span class="hs-identifier hs-var">sl1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042212"><span class="hs-identifier hs-var">bl1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-48"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042213"><span class="hs-identifier hs-var">sl1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042212"><span class="hs-identifier hs-var">bl1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042208"><span class="hs-identifier hs-var">sc1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042207"><span class="hs-identifier hs-var">bc1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-49"></span><span>             </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042206"><span class="hs-identifier hs-var">sl2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042204"><span class="hs-identifier hs-var">bl2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-50"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042206"><span class="hs-identifier hs-var">sl2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042204"><span class="hs-identifier hs-var">bl2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042203"><span class="hs-identifier hs-var">sc2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042202"><span class="hs-identifier hs-var">bc2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042213"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042213"><span class="hs-identifier hs-var">sl1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042208"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042208"><span class="hs-identifier hs-var">sc1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042206"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042206"><span class="hs-identifier hs-var">sl2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042203"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042203"><span class="hs-identifier hs-var">sc2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HpcPos -&gt; (Int, Int, Int, Int)
</span><a href="Trace.Hpc.Util.html#fromHpcPos"><span class="hs-identifier hs-var">fromHpcPos</span></a></span><span> </span><span class="annot"><span class="annottext">HpcPos
</span><a href="#local-6989586621679042215"><span class="hs-identifier hs-var">small</span></a></span><span>
</span><span id="line-52"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679042212"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042212"><span class="hs-identifier hs-var">bl1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042207"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042207"><span class="hs-identifier hs-var">bc1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042204"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042204"><span class="hs-identifier hs-var">bl2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042202"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042202"><span class="hs-identifier hs-var">bc2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HpcPos -&gt; (Int, Int, Int, Int)
</span><a href="Trace.Hpc.Util.html#fromHpcPos"><span class="hs-identifier hs-var">fromHpcPos</span></a></span><span> </span><span class="annot"><span class="annottext">HpcPos
</span><a href="#local-6989586621679042214"><span class="hs-identifier hs-var">big</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679042197"><span id="local-6989586621679042200"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-55"></span><span>   </span><span id="local-6989586621679042190"><span class="annot"><span class="annottext">show :: HpcPos -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#P"><span class="hs-identifier hs-type">P</span></a></span><span> </span><span id="local-6989586621679042188"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042188"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span id="local-6989586621679042187"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042187"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621679042186"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042186"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span id="local-6989586621679042185"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042185"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042188"><span class="hs-identifier hs-var">l1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042187"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042186"><span class="hs-identifier hs-var">l2</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042185"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679042178"><span id="local-6989586621679042180"><span id="local-6989586621679042182"><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>  </span><span id="local-6989586621679042171"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS HpcPos
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span id="local-6989586621679042169"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042169"><span class="hs-identifier hs-var">_i</span></a></span></span><span> </span><span id="local-6989586621679042168"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042168"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int, Int, Int, Int) -&gt; HpcPos
</span><a href="Trace.Hpc.Util.html#toHpcPos"><span class="hs-identifier hs-var">toHpcPos</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042166"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042165"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042164"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String -&gt; Int
forall a. Read a =&gt; String -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042163"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042162"><span class="hs-identifier hs-var">after</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-59"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679042159"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042159"><span class="hs-identifier hs-var">before</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042162"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042162"><span class="hs-identifier hs-var">after</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">','</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042168"><span class="hs-identifier hs-var">pos</span></a></span><span>
</span><span id="line-61"></span><span>         </span><span id="local-6989586621679042153"><span class="annot"><span class="annottext">parseError :: a -&gt; a
</span><a href="#local-6989586621679042153"><span class="hs-identifier hs-var hs-var">parseError</span></a></span></span><span> </span><span id="local-6989586621679042152"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042152"><span class="hs-identifier hs-var">a</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; String -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Read HpcPos: Could not parse: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042152"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-62"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679042145"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042145"><span class="hs-identifier hs-var">lhs0</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042144"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042144"><span class="hs-identifier hs-var">rhs0</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042159"><span class="hs-identifier hs-var">before</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-63"></span><span>                               </span><span class="hs-special">(</span><span id="local-6989586621679042143"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042143"><span class="hs-identifier hs-var">lhs</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679042142"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042142"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042143"><span class="hs-identifier hs-var">lhs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042142"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>                               </span><span class="hs-special">(</span><span id="local-6989586621679042141"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042141"><span class="hs-identifier hs-var">lhs</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042141"><span class="hs-identifier hs-var">lhs</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042141"><span class="hs-identifier hs-var">lhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>                               </span><span class="annot"><span class="annottext">(String, String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (String, String)
forall {a} {a}. Show a =&gt; a -&gt; a
</span><a href="#local-6989586621679042153"><span class="hs-identifier hs-var">parseError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042159"><span class="hs-identifier hs-var">before</span></a></span><span>
</span><span id="line-66"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679042166"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042166"><span class="hs-identifier hs-var">l1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042165"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042165"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042145"><span class="hs-identifier hs-var">lhs0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-67"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679042137"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042137"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679042136"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042136"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042137"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042136"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span>                            </span><span class="annot"><span class="annottext">(String, String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (String, String)
forall {a} {a}. Show a =&gt; a -&gt; a
</span><a href="#local-6989586621679042153"><span class="hs-identifier hs-var">parseError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042145"><span class="hs-identifier hs-var">lhs0</span></a></span><span>
</span><span id="line-69"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679042164"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042164"><span class="hs-identifier hs-var">l2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042163"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042163"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042144"><span class="hs-identifier hs-var">rhs0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-70"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679042132"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042132"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679042131"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042131"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042132"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042131"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>                            </span><span class="annot"><span class="annottext">(String, String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (String, String)
forall {a} {a}. Show a =&gt; a -&gt; a
</span><a href="#local-6989586621679042153"><span class="hs-identifier hs-var">parseError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042144"><span class="hs-identifier hs-var">rhs0</span></a></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- Very simple Hash number generators</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="hs-keyword">class</span><span> </span><span id="HpcHash"><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-var">HpcHash</span></a></span></span><span> </span><span id="local-6989586621679042340"><span class="annot"><a href="#local-6989586621679042340"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-78"></span><span>  </span><span id="toHash"><span class="annot"><a href="Trace.Hpc.Util.html#toHash"><span class="hs-identifier hs-type">toHash</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679042340"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-keyword">newtype</span><span> </span><span id="Hash"><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Hash"><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042122"><span id="local-6989586621679042127"><span class="annot"><span class="annottext">Hash -&gt; Hash -&gt; Bool
(Hash -&gt; Hash -&gt; Bool) -&gt; (Hash -&gt; Hash -&gt; Bool) -&gt; Eq Hash
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Hash -&gt; Hash -&gt; Bool
$c/= :: Hash -&gt; Hash -&gt; Bool
== :: Hash -&gt; Hash -&gt; Bool
$c== :: Hash -&gt; Hash -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679042112"><span id="local-6989586621679042114"><span id="local-6989586621679042116"><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-83"></span><span>  </span><span id="local-6989586621679042109"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS Hash
</span><a href="#local-6989586621679042109"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span id="local-6989586621679042108"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042108"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679042107"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042107"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042106"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042105"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042106"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042106"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042105"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042105"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS Word32
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042108"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679042107"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-85"></span><span>                  </span><span class="hs-special">]</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679042100"><span id="local-6989586621679042102"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-88"></span><span>  </span><span id="local-6989586621679042097"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Hash -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span id="local-6989586621679042095"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042095"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042094"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042094"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32 -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042095"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042094"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-91"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042082"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042082"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679042081"><span class="annot"><span class="annottext">+ :: Hash -&gt; Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var hs-var hs-var hs-var">+</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042079"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042079"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042082"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042079"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042077"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042077"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679042076"><span class="annot"><span class="annottext">* :: Hash -&gt; Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var hs-var hs-var hs-var">*</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042074"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042074"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042077"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042074"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042072"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042072"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679042071"><span class="annot"><span class="annottext">- :: Hash -&gt; Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var hs-var hs-var hs-var">-</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042070"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042070"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042072"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042070"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-94"></span><span>  </span><span id="local-6989586621679042068"><span class="annot"><span class="annottext">negate :: Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var hs-var hs-var hs-var">negate</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042067"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042067"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042067"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-95"></span><span>  </span><span id="local-6989586621679042065"><span class="annot"><span class="annottext">abs :: Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#abs"><span class="hs-identifier hs-var hs-var hs-var hs-var">abs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042063"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042063"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042063"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-96"></span><span>  </span><span id="local-6989586621679042061"><span class="annot"><span class="annottext">signum :: Hash -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#signum"><span class="hs-identifier hs-var hs-var hs-var hs-var">signum</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679042059"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042059"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#signum"><span class="hs-identifier hs-var">signum</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679042059"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-97"></span><span>  </span><span id="local-6989586621679042057"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Hash
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span id="local-6989586621679042056"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679042056"><span class="hs-identifier hs-var">n</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word32
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679042056"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-100"></span><span>  </span><span id="local-6989586621679042049"><span class="annot"><span class="annottext">toHash :: Int -&gt; Hash
</span><a href="#local-6989586621679042049"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span id="local-6989586621679042048"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042048"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679042048"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-103"></span><span>  </span><span id="local-6989586621679042044"><span class="annot"><span class="annottext">toHash :: Integer -&gt; Hash
</span><a href="#local-6989586621679042044"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span id="local-6989586621679042043"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679042043"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Hash
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679042043"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621679042038"><span class="annot"><span class="annottext">toHash :: Char -&gt; Hash
</span><a href="#local-6989586621679042038"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span id="local-6989586621679042037"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679042037"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word32) -&gt; Int -&gt; Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679042037"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>  </span><span id="local-6989586621679042032"><span class="annot"><span class="annottext">toHash :: Bool -&gt; Hash
</span><a href="#local-6989586621679042032"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Hash
</span><span class="hs-number">1</span></span><span>
</span><span id="line-110"></span><span>  </span><span class="annot"><a href="Trace.Hpc.Util.html#toHash"><span class="hs-identifier hs-var">toHash</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Hash
</span><span class="hs-number">0</span></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span id="local-6989586621679042336"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679042336"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679042336"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>  </span><span id="local-6989586621679042022"><span class="annot"><span class="annottext">toHash :: [a] -&gt; Hash
</span><a href="#local-6989586621679042022"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span id="local-6989586621679042021"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679042021"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Hash -&gt; a -&gt; Hash) -&gt; Hash -&gt; [a] -&gt; Hash
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679042020"><span class="annot"><span class="annottext">Hash
</span><a href="#local-6989586621679042020"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621679042019"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042019"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Hash
forall a. HpcHash a =&gt; a -&gt; Hash
</span><a href="Trace.Hpc.Util.html#toHash"><span class="hs-identifier hs-var">toHash</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042019"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Hash -&gt; Hash -&gt; Hash
</span><a href="Trace.Hpc.Util.html#hxor"><span class="hs-operator hs-var">`hxor`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Hash
</span><a href="#local-6989586621679042020"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Hash -&gt; Hash -&gt; Hash
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Hash
</span><span class="hs-number">33</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Hash
</span><span class="hs-number">5381</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679042021"><span class="hs-identifier hs-var">xs</span></a></span></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span id="local-6989586621679042329"><span id="local-6989586621679042330"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679042330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679042329"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679042330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679042329"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-116"></span><span>  </span><span id="local-6989586621679042009"><span class="annot"><span class="annottext">toHash :: (a, b) -&gt; Hash
</span><a href="#local-6989586621679042009"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679042008"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042008"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679042007"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679042007"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Hash
forall a. HpcHash a =&gt; a -&gt; Hash
</span><a href="Trace.Hpc.Util.html#toHash"><span class="hs-identifier hs-var">toHash</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679042008"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Hash -&gt; Hash -&gt; Hash
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Hash
</span><span class="hs-number">33</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Hash -&gt; Hash -&gt; Hash
</span><a href="Trace.Hpc.Util.html#hxor"><span class="hs-operator hs-var">`hxor`</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Hash
forall a. HpcHash a =&gt; a -&gt; Hash
</span><a href="Trace.Hpc.Util.html#toHash"><span class="hs-identifier hs-var">toHash</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679042007"><span class="hs-identifier hs-var">b</span></a></span></span></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcHash"><span class="hs-identifier hs-type">HpcHash</span></a></span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#HpcPos"><span class="hs-identifier hs-type">HpcPos</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-119"></span><span>  </span><span id="local-6989586621679041992"><span class="annot"><span class="annottext">toHash :: HpcPos -&gt; Hash
</span><a href="#local-6989586621679041992"><span class="hs-identifier hs-var hs-var hs-var hs-var">toHash</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#P"><span class="hs-identifier hs-type">P</span></a></span><span> </span><span id="local-6989586621679041991"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041991"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679041990"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041990"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679041989"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041989"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679041988"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041988"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word32) -&gt; Int -&gt; Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041991"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x1000000</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041990"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x10000</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041989"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x100</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679041988"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="annot"><a href="Trace.Hpc.Util.html#hxor"><span class="hs-identifier hs-type">hxor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span>
</span><span id="line-122"></span><span id="hxor"><span class="annot"><span class="annottext">hxor :: Hash -&gt; Hash -&gt; Hash
</span><a href="Trace.Hpc.Util.html#hxor"><span class="hs-identifier hs-var hs-var">hxor</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679041987"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679041987"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-type">Hash</span></a></span><span> </span><span id="local-6989586621679041986"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679041986"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Hash
</span><a href="Trace.Hpc.Util.html#Hash"><span class="hs-identifier hs-var">Hash</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Hash) -&gt; Word32 -&gt; Hash
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679041987"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#xor"><span class="hs-operator hs-var">`xor`</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679041986"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span id="local-6989586621679042327"><span class="annot"><a href="Trace.Hpc.Util.html#catchIO"><span class="hs-identifier hs-type">catchIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679042327"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">Exception.IOException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679042327"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679042327"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-125"></span><span id="catchIO"><span class="annot"><span class="annottext">catchIO :: forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="Trace.Hpc.Util.html#catchIO"><span class="hs-identifier hs-var hs-var">catchIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-identifier hs-var">Exception.catch</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | Read a file strictly, as opposed to how `readFile` does it using lazy IO, but also</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- disregard system locale and assume that the file is encoded in UTF-8. Haskell source</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- files are expected to be encoded in UTF-8 by GHC.</span><span>
</span><span id="line-131"></span><span class="annot"><a href="Trace.Hpc.Util.html#readFileUtf8"><span class="hs-identifier hs-type">readFileUtf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-132"></span><span id="readFileUtf8"><span class="annot"><span class="annottext">readFileUtf8 :: String -&gt; IO String
</span><a href="Trace.Hpc.Util.html#readFileUtf8"><span class="hs-identifier hs-var hs-var">readFileUtf8</span></a></span></span><span> </span><span id="local-6989586621679041981"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041981"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-133"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IOMode -&gt; (Handle -&gt; IO String) -&gt; IO String
forall r. String -&gt; IOMode -&gt; (Handle -&gt; IO r) -&gt; IO r
</span><a href="../../base/src/System.IO.html#withBinaryFile"><span class="hs-identifier hs-var">withBinaryFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041981"><span class="hs-identifier hs-var">filepath</span></a></span><span> </span><span class="annot"><span class="annottext">IOMode
</span><a href="../../base/src/GHC.IO.IOMode.html#ReadMode"><span class="hs-identifier hs-var">ReadMode</span></a></span><span> </span><span class="annot"><span class="annottext">((Handle -&gt; IO String) -&gt; IO String)
-&gt; (Handle -&gt; IO String) -&gt; IO String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679041978"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041978"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">Handle -&gt; TextEncoding -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hSetEncoding"><span class="hs-identifier hs-var">hSetEncoding</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041978"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">TextEncoding
</span><a href="../../base/src/GHC.IO.Encoding.html#utf8"><span class="hs-identifier hs-var">utf8</span></a></span><span>  </span><span class="hs-comment">-- see #17073</span><span>
</span><span id="line-135"></span><span>    </span><span id="local-6989586621679041975"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041975"><span class="hs-identifier hs-var">contents</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO String
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hGetContents"><span class="hs-identifier hs-var">hGetContents</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041978"><span class="hs-identifier hs-var">h</span></a></span><span>
</span><span id="line-136"></span><span>    </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041975"><span class="hs-identifier hs-var">contents</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO () -&gt; IO ()
forall a b. NFData a =&gt; a -&gt; b -&gt; b
</span><a href="../../deepseq/src/Control.DeepSeq.html#deepseq"><span class="hs-operator hs-var">`deepseq`</span></a></span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041978"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-comment">-- prevent lazy IO</span><span>
</span><span id="line-137"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041975"><span class="hs-identifier hs-var">contents</span></a></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span class="hs-comment">-- | Write file in UTF-8 encoding. Parent directory will be created if missing.</span><span>
</span><span id="line-140"></span><span class="annot"><a href="Trace.Hpc.Util.html#writeFileUtf8"><span class="hs-identifier hs-type">writeFileUtf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span id="writeFileUtf8"><span class="annot"><span class="annottext">writeFileUtf8 :: String -&gt; String -&gt; IO ()
</span><a href="Trace.Hpc.Util.html#writeFileUtf8"><span class="hs-identifier hs-var hs-var">writeFileUtf8</span></a></span></span><span> </span><span id="local-6989586621679041972"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041972"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span id="local-6989586621679041971"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041971"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-142"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier hs-var">createDirectoryIfMissing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041972"><span class="hs-identifier hs-var">filepath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IOMode -&gt; (Handle -&gt; IO ()) -&gt; IO ()
forall r. String -&gt; IOMode -&gt; (Handle -&gt; IO r) -&gt; IO r
</span><a href="../../base/src/System.IO.html#withBinaryFile"><span class="hs-identifier hs-var">withBinaryFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041972"><span class="hs-identifier hs-var">filepath</span></a></span><span> </span><span class="annot"><span class="annottext">IOMode
</span><a href="../../base/src/GHC.IO.IOMode.html#WriteMode"><span class="hs-identifier hs-var">WriteMode</span></a></span><span> </span><span class="annot"><span class="annottext">((Handle -&gt; IO ()) -&gt; IO ()) -&gt; (Handle -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679041969"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041969"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>    </span><span class="annot"><span class="annottext">Handle -&gt; TextEncoding -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hSetEncoding"><span class="hs-identifier hs-var">hSetEncoding</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041969"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">TextEncoding
</span><a href="../../base/src/GHC.IO.Encoding.html#utf8"><span class="hs-identifier hs-var">utf8</span></a></span><span>  </span><span class="hs-comment">-- see #17073</span><span>
</span><span id="line-145"></span><span>    </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679041969"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679041971"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-146"></span></pre></body></html>